From 1697f0641659617e4432f8923124772f32c86d19 Mon Sep 17 00:00:00 2001 From: Robert Lipe Date: Tue, 15 Sep 2015 22:38:02 -0500 Subject: [PATCH] Improve test coverage of NMEA WPT handling. --- nmea.cc | 2 +- reference/waypoints.nmea | 9 +++++++++ testo.d/nmea.test | 7 +++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 reference/waypoints.nmea diff --git a/nmea.cc b/nmea.cc index 14631ebbc..a0a2ef7dd 100644 --- a/nmea.cc +++ b/nmea.cc @@ -2,7 +2,7 @@ Read files containing selected NMEA 0183 sentences. Based on information by Eino Uikkanenj - Copyright (C) 2004-2006 Robert Lipe, robertlipe+source@gpsbabel.org + Copyright (C) 2004-2015 Robert Lipe, robertlipe+source@gpsbabel.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/reference/waypoints.nmea b/reference/waypoints.nmea new file mode 100644 index 000000000..124a638ea --- /dev/null +++ b/reference/waypoints.nmea @@ -0,0 +1,9 @@ +$GPWPL,3558.322,N,08708.082,W,GCEBB*1D +$GPWPL,3605.441,N,08640.773,W,GC1A37*21 +$GPWPL,3559.776,N,08637.207,W,GC1C2B*5C +$GPWPL,3602.309,N,08638.917,W,GC25A9*25 +$GPWPL,3606.731,N,08644.506,W,GC2723*52 +$GPWPL,3603.845,N,08647.431,W,GC2B71*2F +$GPWPL,3605.266,N,08648.584,W,GC309F*28 +$GPWPL,3603.450,N,08653.520,W,GC317A*21 +$GPWPL,3604.968,N,08652.037,W,GC317D*27 diff --git a/testo.d/nmea.test b/testo.d/nmea.test index a1cfcc706..28b39a564 100644 --- a/testo.d/nmea.test +++ b/testo.d/nmea.test @@ -13,3 +13,10 @@ compare ${REFERENCE}/track/nmea+ms.gpx ${TMPDIR}/nmea+ms.gpx gpsbabel -i nmea -f ${REFERENCE}/track/amod-nmea -o gpx -F ${TMPDIR}/amod-out.gpx -o nmea -F ${TMPDIR}/amod-pure compare ${REFERENCE}/track/amod.gpx ${TMPDIR}/amod-out.gpx compare ${REFERENCE}/track/amod-cleansed ${TMPDIR}/amod-pure + +# Test GPWPL waypoints. Verify we can write first. +gpsbabel -i geo -f geocaching.loc -o nmea -F ${TMPDIR}/waypoints.nmea +compare ${REFERENCE}/waypoints.nmea ${TMPDIR}/waypoints.nmea +# Now read our reference file and prove that our writer will make one to match. +gpsbabel -i nmea -f ${REFERENCE}/waypoints.nmea -o nmea -F ${TMPDIR}/wayout.nmea +compare ${REFERENCE}/waypoints.nmea ${TMPDIR}/wayout.nmea -- 2.30.2